/*
  These are styles for the actual tandem application UX.
  
*/

@import "variables";

body.tandem-admin-bar {
  margin-top: 35px;
}
#tandem_page_links {
  z-index: 900;
  position: fixed;
  top: 0;
  left: 0;
  height: 35px;
  line-height: 35px;
  width: 100%;
  background: #333;
  margin: 0;  
  padding: 0 10px;  
  border-bottom: 1px solid $darkblue;
  li {
    display: inline;    
    padding: 0 20px;
    a, a:active, a:visited {
     color: $lightblue;
     text-decoration: none; 
     @include goo;
     &:hover {color: #aaa;@include goo;}

    }
  }
  a#page_new_link {
    background: transparent url(image_path('tandem/tandem_logo_nav.png')) left no-repeat;
    padding-left: 100px;
    @include goo;
  }
}
.tandem_content:hover, .tandem_resource:hover {
  outline: 1px solid $midblue;
  cursor: pointer;
}
.tandem_toolbar {
  position: absolute;
  margin: 10px 5px;
  display: none;
  background: none;  
  font-size: 13px;
  @include goo;
}
.tandem_toolbar a.tandem_edit_link,
.tandem_toolbar a.tandem_edit_link:active,
.tandem_toolbar a.tandem_edit_link:visited,
.tandem_toolbar a.tandem_edit_resource,
.tandem_toolbar a.tandem_edit_resource:active,
.tandem_toolbar a.tandem_edit_resource:visited,
.tandem_toolbar a.tandem_show_resource,
.tandem_toolbar a.tandem_show_resource:active,
.tandem_toolbar a.tandem_show_resource:visited,
.tandem_toolbar a.tandem_delete_resource,
.tandem_toolbar a.tandem_delete_resource:active,
.tandem_toolbar a.tandem_delete_resource:visited
{
  font-size: 13px;
  @include goo;  
  color: #333;
  background: $lightblue;
  padding: 5px 10px;
  text-decoration: none;    
  text-transform: uppercase;
  @include radius(3px);
  font-weight: normal;
  box-shadow: 0px 0px 5px #333;
  &:hover {
    color: #fff !important;
    background: $darkblue;
  }
}
.tandem_toolbar.tandem_toolbar_resource a.tandem_show_resource {
  background: $lowblue;

}
.tandem_toolbar.tandem_toolbar_resource a.tandem_delete_resource {
  background: #f8e8e8;
  color: $red;
}
.tandem_toolbar.tandem_toolbar_resource a {
 margin: 0 5px;
}



/////// Tandem Editor
h4.tandem-logo {
  font-size: 12px;
  text-align:right;
  position: relative;
  right: 0;
  @include goo;
  color: $midblue;
  font-weight: none;
  height: 33px;
  margin: 10px 0;
  font-weight: normal;
  text-shadow: none;
  background: transparent url(image_path('tandem/tandem_logo.png')) 100% 0 no-repeat;
  text-indent: -9999px;	
}


/////// Contents, Page, & Image Editor

#tandem-editor {  
  width: 100%;
  
}
#tandem-editor-wym {
  width: 100%;
}

#tandem-editor, #tandem-editor-wym {
  h1, h1.tandem-title {    
    @include sans-serif;
    font-size: 20px;
    color: $darkblue;
    font-weight: 300 !important;
    margin: 0 0 5px 0;
    padding: 0 0 5px 0;
    background: none;
    line-height: normal;  
    border: none;
    border-bottom: 1px solid $lightblue;
    background: none;  
  }
  h3#selected_image_title {
    @include goo;
    font-size: 20px;
    color: #407992;    
    margin: 15px 0;
    padding: 0;
    border: none;
  }
  iframe{
    border:none;
    height: 100%;
    width: 100%;
  }
  a.use {
    font-size: 15px; 
    color: $darkblue;
  }
  form {
    margin: 0;
    padding: 0;    
    div {
      padding: 5px;
    }
    div.field_with_errors {
      padding:0;
      label {padding: 0;}
      input {
        background: #fdeeee;
      }
    }
    label {
      @include goo;      
      font-size: 15px !important;
      color: $darkblue;
      width: 100px;
      height: 100%;
      padding: 3px 0 0 0;
      margin:0;
      line-height: normal;
      text-align: left;
      font-size: 14px;        
      display:block;
      float: left;      
      border: none;

    }
    input, textarea {
      border: 1px solid #ccc;
      @include radius(3px);
      -webkit-box-shadow: 0 0 5px #aaa;
      -moz-box-shadow: 0 0 5px #aaa;
      box-shadow: 0 0 5px #aaa;
      padding: 5px;
      position:relative;
      width: auto;
      background: white;
      color: #333;
      @include sans-serif;
      border: none;
      text-transform: inherit;
    }
    input[type="checkbox"], input[type="radio"] {
      position: relative;
      bottom: 5px;
    }
    textarea {
      font-family: Times New Roman, serif;
    }
    select {
      width: auto;
      @include sans-serif;      
    }
    input#page_is_default, input#page_parent_id_, input#page_parent_id_1 {      
      margin-right: 0;
      vertical-align: none;
    }
    .field {
      margin: 15px 0;
      @include goo;
      width: auto;
    }
    .field span {
      font-size: 14px;
      color: $darkblue;
      padding: 0 10px 0 5px;
      position: relative;
      top: -5px;
    }
   .wym_box {
     background: none;
     border:none;
     border-bottom: 1px solid #eee;
   } 
   .wym_iframe {
     background: #fff;
     border: 1px solid #ccc;     
   }
   .wym_skin_default .wym_iframe iframe {border:none;height: 300px;}
   iframe .wym_iframe {background: transparent; border:none;}
  } // end form
  .wym_section {
    background: none;
    h2 {
      background: none;
      border: 1px solid $darkblue;      
      @include goo;
      border: none;
      padding: 0;
      margin: 0;
    }
    ul {
      border: none;
    }
    a {
      @include goo;
      color: $darkblue;    
      padding: 3px 5px;  
    }
    border:none;
    padding: 2px 3px;    
  } // end wym-section
  .actions {
//    margin: 15px 10px;    
    input.wymupdate,input.save {
      background: #4ba9d8;
      color: #fff;
      font-size: 18px;
      @include radius(8px);
      border: 1px solid #4ba9d8;
      cursor: pointer;
      padding: 8px 10px;     
      @include goo;
      &:hover {color: #fff;background: $darkblue;}      
    }      
  } // end actions  
  #error_explanation {
    @include errors;
  }
  ul#tandem_image_attributes {
    margin: 0;
    padding: 0;
    li {
      list-style: none;
      padding: 5px;
      list-position: inside;
      @include goo;
      color: #3e4c52;
      font-size: 12px;
    }
    li.image_name {
      font-size: 16px;
    }
  }
} // end tandem editor

.wym {width: 100%;}

/// Image Upload Modal

#tandem-editor-wym form.tandem_content_editor {
float: left;
padding-left: 1%;
}
form.tandem_text_editor {
  width: 100%;
}
form.tandem_text_editor textarea#content_text_content {
  width: 95%;
}
form.tandem_image_editor {
  width: 24%;
}
iframe {
  width: 90%;
  padding: 0;
  margin :0;
  height: 300px;
  overflow: scroll;   
}
div#tandem-image-editor {
  width:73%;
  float:left;
  border-left: 1px solid $lightblue;
}
//
h3.tandem-mod-title {
  font-size: 15px;
  @include goo;
  color: $darkblue;
  font-weight: normal;
  margin: 10px 0;
}

#tandem-image-editor div#gallery-image {
width: 100%;
padding: 0;
margin: 0;


  h3 {
    font-size: 15px;
    @include goo;
    color: $darkblue;
    font-weight: normal;
    margin: 10px 0;
  }
}
/* force to show scrollbars in webkit browsers */

#tandem-editor-wym {
  ::-webkit-scrollbar {
  	-webkit-appearance: none;
  	width: 7px;
  }
  ::-webkit-scrollbar-thumb {
  	border-radius: 4px;
  	background-color: rgba(0,0,0,.5);
  	-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
  }
}

section#tandem_image_gallery {
  max-height:400px;
  overflow-y: scroll;
  border-top: 1px solid $lightblue;
  margin: 10px 0;
  h1 {
    font-weight: normal;
    color: $darkblue;
    font-size: 15px;
    @include goo;
  }
  ul {
    list-style:none;
    li {
      float:left;
      display: block;
      width: 180px;
      height: 130px;
      margin: 0 10px 40px 10px;
      padding: 10px 5px 5px 5px;
      background: $lightblue;
        span {
          display: block;
          width: 150px;
          height: 80px;
          margin: 0 auto;
          overflow: hidden;  
          text-align:center;
        }
        img {
        margin: 0 auto;      
        background: #fff;
        height: 100%;
        }
        
        p {
          @include goo;
          color: $darkblue;
          display:block;
          clear:both;
          font-size: 12px;
          text-align: center;
          position: relative;
          padding: 5px 0;
          a.delete_image {
            display: block;
            width: 16px;
            height: 16px;
            background: transparent url(image_path('tandem/ic-delete_image.png')) 0 0 no-repeat;
            position: absolute;
            bottom: 0;
            right: 0;
            cursor: default;
            &:hover {
             opacity: 0.5;
             -moz-opacity: 0.5;
             filter:alpha(opacity=50); 
            }
          }
        }
        &:hover {         
         cursor: pointer;
         -webkit-box-shadow: 0 0 20px rgba(122,122,122, .5);
         -moz-box-shadow: 0 0 20px rgba(122,122,122, .5);
         box-shadow: 0 0 20px rgba(122,122,122, .5);
         -webkit-transform: rotate(0deg) scale(1.05);
         -moz-transform: rotate(0deg) scale(1.05);
         transform: rotate(0deg) scale(1.05);
         z-index: 300;
        }
        
    }

  }
}

#tandem-upload-image {
  padding: 0;
  margin: 0 0 0 20px;
  @include goo;  
  position: relative;
  span#upload-button {
    display: block;
    width: 200px;
    padding: 10px 0 10px 10px;
    height: 20px;
    margin-top: 10px;
    color: #407992;
    @include radius(5px);
    border: 1px solid #c3cace;
    font-size: 18px;
    -webkit-box-shadow: 0px 0px 7px #ccc;
    -moz-box-shadow: 0px 0px 7px #ccc;
    box-shadow: 0px 0px 7px #ccc;
    background: #e8f2f7;
    background: #e9f3f8; /* Old browsers */
    background: -moz-linear-gradient(top,  #e9f3f8 0%, #dbe9f0 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e9f3f8), color-stop(100%,#dbe9f0)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #e9f3f8 0%,#dbe9f0 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #e9f3f8 0%,#dbe9f0 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #e9f3f8 0%,#dbe9f0 100%); /* IE10+ */
    background: linear-gradient(top,  #e9f3f8 0%,#dbe9f0 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e9f3f8', endColorstr='#dbe9f0',GradientType=0 ); /* IE6-9 */
    @include goo;
    cursor: pointer;
    position: relative;
    &#upload-button:hover {
     background: #e5e5e5; /* Old browsers */
     background: -moz-linear-gradient(top,  #e5e5e5 0%, #d1d1d1 100%); /* FF3.6+ */
     background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e5e5e5), color-stop(100%,#d1d1d1)); /* Chrome,Safari4+ */
     background: -webkit-linear-gradient(top,  #e5e5e5 0%,#d1d1d1 100%); /* Chrome10+,Safari5.1+ */
     background: -o-linear-gradient(top,  #e5e5e5 0%,#d1d1d1 100%); /* Opera 11.10+ */
     background: -ms-linear-gradient(top,  #e5e5e5 0%,#d1d1d1 100%); /* IE10+ */
     background: linear-gradient(top,  #e5e5e5 0%,#d1d1d1 100%); /* W3C */
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e5e5e5', endColorstr='#d1d1d1',GradientType=0 ); /* IE6-9 */
     color: #fff;
     border-color: #aaa;
     cursor: pointer;
    }
     input#image_resource {
       opacity: 0;
       -moz-opacity: 0;
       filter:alpha(opacity=0);    
       position: absolute;
       top: 0;
       left: 0;
       cursor: pointer;
       width: 200px;
     }
  }
  input#upload-button:hover {
    background: #eee;
  }
  section#error_explanation {
    @include errors;
    display:none;
  }
  .loader {
    display:none;
    width: 200px;
    height: 20px;
    background: $lightblue;
    position: absolute;
    top: 10px;
    left: 250px;
    @include radius(5px);
    padding: 0;
    margin: 0;
    -webkit-box-shadow: 0 0 5px #aaa;
    -moz-box-shadow: 0 0 5px #aaa;    
    box-shadow: 0 0 5px #aaa;
    overflow: hidden;
    .range {
      width: 0;
      padding:0;
      height: 20px;
      background: transparent url(image_path('tandem/loader_stripe.png'));    
      span {
        font-size: 14px;
        position: relative;
        bottom: 5px;
      }
    }
  }
}

/// Colorbox Overwrites

#cboxTitle{
  display: none !important;
  text-transform: capitalize;
  text-align:center; 
  width:100%; 
  font-size: 18px;
  @include goo;
  color: $highblue;
  font-weight: none;
}
#cboxOverlay {
  background: #333;
}
#cboxClose {
  @include goo;
  color: $darkblue;
  font-size: 13px;
  bottom: 25px;
}
#cboxContent {
 background: #fff url(image_path('tandem/tandem_logo.png')) 0 100%  no-repeat; 
}
#cboxLoadedContent{
  padding-bottom: 50px;
  background: #fff;

}


/// Advanced Settings

#tandem_advanced_settings {
  margin: 0 0 15px 0;
  .advanced-settings {
    display: none;
  }
  h3 {
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    display: block;
    margin: 10px;
    color: $darkblue;
    text-decoration: none;
    @include goo;
    padding: 3px 0 0 20px;
    background: transparent url(image_path('tandem/ic-star.png')) left no-repeat;
  }
  h3:hover {
    color: #333;
  }
}
form.tandem_content_editor div#tandem_advanced_settings .advanced-settings {
   display: none;
   .field {
     padding: none;
     label {
       width: 100%;
       padding: 0;
       margin: 0;
       float: none;
     }
     input {
       width: 90%;
     }
   }
}
form.tandem_text_editor div#tandem_advanced_settings .advanced-settings .field input {
      width: 200px;
}

/* new clearfix */
.clearfix:after {
	visibility: hidden;
	display: block;
	font-size: 0;
	content: " ";
	clear: both;
	height: 0;
	}
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
  
